package vip.ifmm.lehouse.email.service.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import vip.ifmm.lehouse.email.service.strategy.EmailSenderStrategy;
import vip.ifmm.lehouse.email.service.strategy.impl.HtmlEmailSenderStrategy;
import vip.ifmm.lehouse.email.service.strategy.impl.TextEmailSenderStrategy;

/**
 * 邮件发送配置
 *
 * @author Fish
 * <p>Email: fishinlove@163.com</p>
 * <p>created by 2019/06/18 20:14:00</p>
 */
@Configuration
public class EmailSenderConfig {

    @Bean
    public EmailSenderStrategy[] emailSenderStrategies(
            TextEmailSenderStrategy textEmailSenderStrategy,
            HtmlEmailSenderStrategy htmlEmailSenderStrategy) {
        return new EmailSenderStrategy[]{
                textEmailSenderStrategy,
                htmlEmailSenderStrategy
        };
    }
}
